home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14460 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: news.dal.ca!news
  2. From: keichele@ac.dal.ca (Klaus Eichele)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Can't Display PopUp Window
  5. Date: Sun, 31 Mar 1996 05:15:28 GMT
  6. Organization: Dalhousie University
  7. Message-ID: <4jkmbh$r9o@News.Dal.Ca>
  8. References: <4jit49$pea@news.asiaonline.net>
  9. NNTP-Posting-Host: rewasylishen.chem.dal.ca
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. samsona@asiaonline.net (Samson Lin) wrote:
  13.  
  14. >Hi,
  15.  
  16. >I am writing a Window C program.  I meet a problem in displaying popup
  17.  
  18. >window.
  19.  
  20.       <SNIP>
  21. >If I repeat the following steps, I can always wake up the LOAD/SAVE 
  22. >popup window :
  23.  
  24. >   (1) Run Borland C++ IDE
  25. >   (2) Run phone book program
  26. >   
  27. >               OR
  28.  
  29. >   (1) Run Borland C++ IDE
  30. >   (2) Quit Borland C++ IDE
  31. >   (3) Run phone book program
  32.  
  33. >If I don't run Borland C++ beforehand, the program still works but I 
  34. >can't see the LOAD/SAVE popup window when I click the LOAD/SAVE menu
  35. >item.  
  36.  
  37. >Why the above case happens?  My pc configuration is Pentium 100,
  38. >8MB ram, Chinese Win v3.1 with Win32s.
  39.  
  40. Hi,
  41. this sounds like a problem typical of a program requiring the Borland
  42. Custom Control library (bwcc.dll) to be loaded but not having the
  43. program itself do so. Your dialog box template probably has some of
  44. Borland's controls (e.g. buttons etc.). If you have the Borland IDE
  45. running, it loads the bwcc.dll for you and your program "profits" from
  46. that. Otherwise, because you don't tell Windows to load the DLL, the
  47. creation of your dialog box fails.
  48.  
  49. One of the cures:
  50. 1) quite early in your WinMain(), call:
  51.    BWCCGetVersion();
  52.    This tells Windows that bwcc.dll is required and so it gets loaded
  53.    for you.
  54.    (alternatively, because you are using MessageBox(), you could call
  55.     the equivalent Borland function BWCCMessageBox())
  56. 2) furthermore you need to include the proper header file:
  57.    #include <bwcc.h>
  58. 3) finally, you need to include the following import library in your
  59.    project file (just the same way you add *.c or *.cpp files):
  60.    bwcc.lib
  61.    (this should be in your bc45\lib directory)
  62.  
  63. Good Luck,
  64. Klaus
  65. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  66. Klaus Eichele         keichele@is.dal.ca  
  67. http://is.dal.ca/~keichele/keichele.html
  68.  
  69.